﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="../Scripts/jquery.js"></script>
<script type="text/javascript" src="../Scripts/Verify.js"></script>
<link href="../Styles/Public.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>字符长度验证</h1>
<h2>概述</h2>
<div class="desc">
  <p>在控件设置参数 <strong>lenlimit</strong>即可实现对录入字符长度的限制。</p>
  <p>&lt;input name=&quot;&quot; type=&quot;text&quot; <strong>lenlimit=&quot;5&quot;</strong>/&gt;（最长5个字符）</p>
  <p>&lt;input name=&quot;&quot; type=&quot;text&quot; <strong>lenlimit=&quot;5-10&quot;</strong>/&gt;（最少5个字符，最多10个字符）</p>
</div>
<h2>示例</h2>
<h3>1、字符长度验证</h3>
<div class="desc">
  <fieldset>
    <legend>单行录入框的验证</legend>
    <pre>&lt;form onsubmit=&quot;alert('验证成功');return false;&quot;&gt;<br />      &lt;p&gt; 测试1：<br />        &lt;input name=&quot;&quot; type=&quot;text&quot; value=&quot;123456&quot; <strong>lenlimit=&quot;5&quot;</strong>/&gt;<br />      &lt;/p&gt;<br />      &lt;p&gt; 测试2：<br />        &lt;input name=&quot;&quot; type=&quot;text&quot; <strong>lenlimit=&quot;5-10&quot;</strong>/&gt;<br />      &lt;/p&gt;<br />      &lt;p&gt;<br />        &lt;input type=&quot;submit&quot; name=&quot;button&quot; class=&quot;button&quot; value=&quot;验证表单&quot; verify=&quot;true&quot;/&gt;<br />      &lt;/p&gt;<br />    &lt;/form&gt;</pre>
    <form onsubmit="alert('验证成功');return false;" place="right">
      <p> 测试1：
        <input name="" type="text" value="123456" lenlimit="5"/>
      </p>
      <p> 测试2：
        <input name="" type="text" lenlimit="5-10"/>
      </p>
      <p>
        <input type="submit" name="button" class="button" value="验证表单" verify="true"/>
      </p>
    </form>
  </fieldset>
  
</div>
<div class="desc">
  <fieldset>
    <legend>多行录入框的验证</legend>
    <pre>&lt;form onsubmit=&quot;alert('验证成功');return false;&quot;&gt;<br />      &lt;p&gt; 测试：<br />        &lt;textarea name=&quot;&quot; rows=&quot;5&quot; style=&quot;width:200px&quot;<strong> lenlimit=&quot;5-100&quot;</strong>&gt;&lt;/textarea&gt;<br />      &lt;/p&gt;<br />      &lt;p&gt;<br />        &lt;input type=&quot;submit&quot; name=&quot;button&quot; class=&quot;button&quot; value=&quot;验证表单&quot; verify=&quot;true&quot;/&gt;<br />      &lt;/p&gt;<br />    &lt;/form&gt;</pre>
    <form onsubmit="alert('验证成功');return false;">
      <p> 测试：
        <textarea name="" rows="5" style="width:200px" lenlimit="5-100"></textarea>
      </p>
      <p>
        <input type="submit" name="button" class="button" value="验证表单" verify="true"/>
      </p>
    </form>
  </fieldset>
  
</div>
</body>
</html>
